package uk.co.benbrown.jvis.client.ui;

import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

import uk.co.benbrown.jvis.client.controller.ClientController;

public class GuiManagerImpl implements GuiManager {

    private static final Logger logger = Logger.getLogger(GuiManager.class);
    
    private ClientController clientController;

    public void setClientController(ClientController clientController) {
	this.clientController = clientController;
    }

    public void init() {
	Display display = new Display(); 
	  Shell shell = new Shell(display); 
	  Label label = new Label(shell, SWT.NONE); 
	  label.setText("Hello, World!"); 
	  shell.pack(); 
	  label.pack(); 
	  shell.open(); 
	  while(!shell.isDisposed()) 
	   if(!display.readAndDispatch()) 
	    display.sleep(); 
	  display.dispose();   
	  label.dispose(); 
    }
}
